Adwaita: dark: Make colorswatch.light tick visible
authorDaniel Boles <dboles@src.gnome.org>
Sat, 16 Sep 2017 14:46:50 +0000 (15:46 +0100)
committerDaniel Boles <dboles@src.gnome.org>
Sat, 16 Sep 2017 16:02:48 +0000 (17:02 +0100)
It used $text_color unconditionally, but in :dark, text is white, so we
overlaid a white tick on any light colours, all the way to white itself.

Using these named colours doesn’t make practical or semantic sense.
Instead, use white/black over dark/light swatches, as in HC, so all
variant–swatch combos work. Light looks the same, & :dark works now.

For backdrop, use alpha 0.5, unlike 0.7 in HC, as that seemed excessive
& different from the current effect. 0.5 is almost identical to how
$backdrop_fg_colour is a 50% mix of $fg_color, & matches backdrop text.

https://bugzilla.gnome.org/show_bug.cgi?id=787531

gtk/theme/Adwaita/_common.scss
gtk/theme/Adwaita/gtk-contained-dark.css
gtk/theme/Adwaita/gtk-contained.css

index f701b3fc1843b47d29a6a86f701981f81bc4e9d3..d03dd991255f08d21c0966c3412d5d980a65b63e 100644 (file)
@@ -4080,19 +4080,19 @@ colorswatch {
   }
 
   &.dark overlay {
-    color: $selected_fg_color;
+    color: white;
 
     &:hover { border-color: if($variant == 'light', transparentize(black, 0.2), $borders_color); }
 
-    &:backdrop { color: $backdrop_selected_fg_color; }
+    &:backdrop { color: transparentize(white, 0.5); }
   }
 
   &.light overlay {
-    color: $text_color;
+    color: black;
 
     &:hover { border-color: if($variant == 'light', transparentize(black, 0.5), $borders_color); }
 
-    &:backdrop { color: $backdrop_text_color; }
+    &:backdrop { color: transparentize(black, 0.5); }
   }
 
   &:drop(active) {
index a883a5c87cf892c08b8fda1f80ec8e86edf71612..6d582fa94100a6c913ad35a1cf627f04314d3246 100644 (file)
@@ -1760,17 +1760,17 @@ colorswatch.right, colorswatch:last-child:not(.bottom) { border-top-right-radius
 
 colorswatch.right overlay, colorswatch:last-child:not(.bottom) overlay { border-top-right-radius: 5px; border-bottom-right-radius: 5px; }
 
-colorswatch.dark overlay { color: #ffffff; }
+colorswatch.dark overlay { color: white; }
 
 colorswatch.dark overlay:hover { border-color: #1b1f20; }
 
-colorswatch.dark overlay:backdrop { color: #d3d4d5; }
+colorswatch.dark overlay:backdrop { color: rgba(255, 255, 255, 0.5); }
 
-colorswatch.light overlay { color: white; }
+colorswatch.light overlay { color: black; }
 
 colorswatch.light overlay:hover { border-color: #1b1f20; }
 
-colorswatch.light overlay:backdrop { color: #d3d4d5; }
+colorswatch.light overlay:backdrop { color: rgba(0, 0, 0, 0.5); }
 
 colorswatch:drop(active) { box-shadow: none; }
 
index 46374423b40b831ad9deb5310be6ba4ea42982b0..3584f3692f32750a066f6002e881e4f911d303cc 100644 (file)
@@ -1780,17 +1780,17 @@ colorswatch.right, colorswatch:last-child:not(.bottom) { border-top-right-radius
 
 colorswatch.right overlay, colorswatch:last-child:not(.bottom) overlay { border-top-right-radius: 5px; border-bottom-right-radius: 5px; }
 
-colorswatch.dark overlay { color: #ffffff; }
+colorswatch.dark overlay { color: white; }
 
 colorswatch.dark overlay:hover { border-color: rgba(0, 0, 0, 0.8); }
 
-colorswatch.dark overlay:backdrop { color: #fcfcfc; }
+colorswatch.dark overlay:backdrop { color: rgba(255, 255, 255, 0.5); }
 
 colorswatch.light overlay { color: black; }
 
 colorswatch.light overlay:hover { border-color: rgba(0, 0, 0, 0.5); }
 
-colorswatch.light overlay:backdrop { color: #323232; }
+colorswatch.light overlay:backdrop { color: rgba(0, 0, 0, 0.5); }
 
 colorswatch:drop(active) { box-shadow: none; }